scalebutton: Apply a shape on the popover
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 4 Feb 2014 19:46:06 +0000 (20:46 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 4 Feb 2014 20:29:25 +0000 (21:29 +0100)
This hideous hack is necessary so far because the main users of
GtkScaleButton are also clutter users, so the GtkScaleButton popover
will be very likely shaped against a clutter-enabled native window.

https://bugzilla.gnome.org/show_bug.cgi?id=723556

gtk/gtkscalebutton.c

index e6de42ea955d5888c0db8dda4363a2982cf94736..d1bd058bf4127c4027eaaefe663b698eb14f1d9a 100644 (file)
@@ -57,6 +57,7 @@
 #include "gtktypebuiltins.h"
 #include "gtkintl.h"
 #include "a11y/gtkscalebuttonaccessible.h"
+#include "gtkpopoverprivate.h"
 
 /**
  * SECTION:gtkscalebutton
@@ -356,6 +357,9 @@ gtk_scale_button_init (GtkScaleButton *button)
   gtk_widget_init_template (GTK_WIDGET (button));
   gtk_popover_set_relative_to (GTK_POPOVER (priv->dock), GTK_WIDGET (button));
 
+  /* FIXME: to be removed when compositing over native windows is fixed */
+  _gtk_popover_set_apply_shape (GTK_POPOVER (priv->dock), TRUE);
+
   /* Need a local reference to the adjustment */
   g_object_ref (priv->adjustment);